package com.xiaoma.config.config;

import com.xiaoma.base.IPeople;
import com.xiaoma.base.ManImpl;
import com.xiaoma.base.MyFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
//@Import(MyImportSelector1.class)//import的selector可以是第三方包的
//@Import(MyImportSelector.class)
public class MyConfig {

    @Bean
    public MyCore gupaoCore(){
    	return new MyCore();
    }

    @Bean
    public MyFactoryBean myFactoryBean(){
      MyFactoryBean myFactoryBean=new MyFactoryBean();
      myFactoryBean.setInterfaceName(new Class[]{IPeople.class});
      myFactoryBean.setTarget(new ManImpl());

      return myFactoryBean;
    }
}
